import {
	computed
} from 'vue'
import {
	request,
	retryableRequest
} from '@/common/request';
import {
	useUserStore
} from '@/stores/user.js'
const userType = computed(() => {
	return useUserStore().userType == 2 ? "b-agent-app/app" : "b-merchant-app/app"
})

export const reportApi = {
	/**
	 查询周报
	 */
	getWeek: (data) => {
		return request({
			url: `/${userType.value}/statistic/report/week`,
			data
		})
	},
	/**
	 * 查询月报
	 */
	getMonth: (data) => {
		return request({
			url: `/${userType.value}/statistic/report/month`,
			data
		})
	},
	/**
	 * 查询日报
	 */
	getDate: (data) => {
		return request({
			url: `/${userType.value}/statistic/report/date`,
			data
		})
	},
}